import type { RouteRecordRaw } from "vue-router";

function Layout() {
  return import("@/layouts/index.vue");
}

const routes: RouteRecordRaw = {
  path: "/users",
  component: Layout,
  redirect: "/users/index",
  name: "users",
  meta: {
    title: "用户管理",
    icon: "iconfont icon-a-customermanagement",
  },
  children: [
    {
      path: "index",
      name: "usersIndex",
      component: () => import("@/views/users/index.vue"),
      meta: {
        sidebar: false,
        title: "用户管理",
        activeMenu: "/users",
      },
    },
    {
      path: "edit",
      name: "usersEdit",
      component: () => import("@/views/users/edit.vue"),
      meta: {
        sidebar: false,
        title: "编辑用户",
        activeMenu: "/users",
      },
    },
    {
      path: "detail",
      name: "usersEetail",
      component: () => import("@/views/users/detail.vue"),
      meta: {
        sidebar: false,
        title: "用户详情",
        activeMenu: "/users",
      },
    },
  ],
};

export default routes;
